
#ifndef _UC_LOG_H_
#define _UC_LOG_H_

#ifndef UC_GATEWAY_SYNC_LOG

#ifndef DBG_LVL
#define DBG_LVL DBG_LOG
#endif
#include <rtdbg.h>
// #ifndef DBG_TAG
// #define DBG_TAG "gw_app"
// #endif

#define TRACE_D LOG_D
#define TRACE_I LOG_I
#define TRACE_W LOG_W
#define TRACE_E LOG_E
#define TRACE_AP LOG_D
#else
#define TRACE_D(x, ...)               \
    {                                 \
        rt_kprintf("[GW] D:");        \
        rt_kprintf(x, ##__VA_ARGS__); \
        rt_kprintf("\n");             \
    }
#define TRACE_I(x, ...)               \
    {                                 \
        rt_kprintf("[GW] I:");        \
        rt_kprintf(x, ##__VA_ARGS__); \
        rt_kprintf("\n");             \
    }
#define TRACE_W(x, ...)               \
    {                                 \
        rt_kprintf("[GW] W:");        \
        rt_kprintf(x, ##__VA_ARGS__); \
        rt_kprintf("\n");             \
    }
#define TRACE_E(x, ...)               \
    {                                 \
        rt_kprintf("[GW] E:");        \
        rt_kprintf(x, ##__VA_ARGS__); \
        rt_kprintf("\n");             \
    }
#define TRACE_AP(x, ...)              \
    {                                 \
        rt_kprintf("[AP] D:");        \
        rt_kprintf(x, ##__VA_ARGS__); \
        rt_kprintf("\n");             \
    }
#endif

void test_data_print(const char *fun, char *data, int len);

void wiota_test_command(const char *string, int cmd);

#endif
